<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="__PUBLIC__/bs/css/bootstrap.min.css">
	<link rel="stylesheet" href="../Public/css/index.css"><!--首页-->
	<link rel="stylesheet" href='../Public/css/shop.css'><!--商品详情-->
	<link rel="stylesheet" href='../Public/css/person.css'><!-- 个人中心 -->
	<script src="__PUBLIC__/bs/js/bootstrap.min.js"></script>
	<script src="__PUBLIC__/bs/js/jquery.js"></script>
</head>
<body>

	<div class="container">
		<!-- 登陆注册 -->
		<div class="top" style="margin-bottom: 1px;">
			<div class="left">
				<ul class='list-inline'>
				<li><a href="<{:U('Index/index')}>"><img src="../Public/image/top.png" style="height:28px;" alt=""></a></li>
				</ul>
			</div>
			<div class="right">
				<ul class="list-inline">
					<if condition="$_SESSION['home_username']">
						<li>欢迎<{$_SESSION['home_username']}></li>
						<li><a href="<{:U('Login/logout')}>">退出</a></li>
					<else/>
						<li>请先 <a href="<{:U('Login/index')}>" style='color:red;'>登陆</a></li>
					</if>
					<li><a href="<{:U('Person/index')}>">个人中心</a></li>
					<li><a href="<{:U('ShopCart/index')}>">购物车</a></li>
				</ul>
			</div>
		</div>
		<!-- 登陆注册   结束-->
		<block name='floor'>
			<!-- 顶部广告 -->
			<div class="ad">
				<div class=" circle">X</div>
				<a href="<{$rowads[0]['url']}>"><img src="__PUBLIC__/upload/<{$rowads[0]['img']}>"  alt=></a>
			</div>
			<!-- 顶部广告   结束 -->
			<!-- 左侧广告 -->
			<div class="l_ad" style=" ">
				<div class=" circle">X</div>
				<a href="<{$rowads[3]['url']}>"><img src="__PUBLIC__/upload/<{$rowads[3]['img']}>"  alt=></a>	
			</div>
			<!-- 左侧广告结束 -->
		<!-- 标题 -->
			<div class="title">
				<div class="row">
					<div class="img col-md-3">
					 <img src="../Public/image/header1.png" alt="">
					</div>
					<div class="col-md-3"></div>
					<!-- 搜索区 -->
					<div class='col-md-4'>
						<form class="search">
						    <input type="text" class="form-control " placeholder="电脑">
						  	<button type="submit" class="btn btn-primary ">搜索</button>
						</form>
					</div>
					<!-- 搜索区   结束 -->
				</div>
				
			</div>
		<!-- 标题   结束 -->
			<!-- 导航 -->
			<div class="nav">
				<ul class="nav nav-pills">
				  <li role="presentation" class="active"><a href="#">首页</a></li>
				  <li role="presentation"><a href="#">电脑</a></li>
				  <li role="presentation"><a href="#">主机</a></li>
				</ul>
			</div>
			<!-- 导航 结束 -->
		
			<!-- 轮播和二级菜单 -->
			<div class="secondMenu">

			</div>
			<!-- 轮播和二级菜单    结束-->
			<!-- 楼层 -->
			<div class="floor">
				<volist name='classrows' id='classrow' key='b'> 
					<!-- 一楼 -->
					<div class="panel panel-primary">
					  <div class="panel-heading">
					  	<span class="left"><h3 class="panel-title"><{$b}>F <{$classrow['name']}></h3></span>
					    <span class="right">
					    	<b>热销商品</b>
					    	<span><a href="<{:U('Class/index','','')}>/class_id/<{$classrow['id']}>">more>></a></span>
					    </span>
					  </div>
					  <div class="panel-body ">
					  <?php
					  	$db=M();
					  	$sql="select * from shop where class_id={$classrow['id']} and shelf=1 order by rand() limit 4 ";
					  	$shoprows=$db->query($sql);
					  ?>
					  		<div class="row">
					  			<volist name='shoprows' id='shoprow'>
					  			<a href="<{:U('Shop/index','','')}>/id/<{$shoprow['id']}>">
									<div class="product col-md-3">
										<div class="img"><img src="__PUBLIC__/upload/shop/t_<{$shoprow['img']}>" alt=""></div>
										<div class="desc">
											<span class="name"><{$shoprow['name']}></span>
											<span class="price"><b><{$shoprow['price']}></b>元</span>
										</div>
									</div>
					  			</a>
					  			</volist>

					  		</div>
					  		
					  </div>
					</div>
					<!-- 一楼    结束-->
				</volist>
				
			</div>
			<!-- 楼层   结束 -->
		</block>
		<!-- 页面底部 -->
		<div class="footer">
			<div class="row">
				<ul class="list-inline">
					<li class="col-md-3"><a href="">联系方式</a></li>
					<li class="col-md-3"><a href="">公司介绍</a></li>
					<li class="col-md-3"><a href="">公司地图</a></li>
					<li class="col-md-3"><a href="">合作伙伴</a></li>
				</ul>
			</div>
			
		</div>
		<!-- 页面底部  结束 -->
	</div>
</body>
<script>

$(function(){
	// 关闭广告按钮
	$('.ad .circle').click(function(){
		$('.ad').hide(350);
	})
	$('.l_ad .circle').click(function(){
		$('.l_ad').hide(350);
	})
})


</script>
</html>

